package cevent.source.cloudcenter.business.config;/**
 * Created by Cevent on 2021/3/13.
 */

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;

/**
 * @author cevent
 * @description 业务核心模组
 * 指定mapper扫描和组件扫描
 * @date 2021/3/13 22:07
 */
@SpringBootApplication
//@EnableEurekaClient
@EnableDiscoveryClient
@MapperScan(value = {"cevent.source.cloudcenter.server.mapper"})
@ComponentScan("cevent.source.cloudcenter")
public class BusinessApplication {
    private static final Logger LOG= LoggerFactory.getLogger(BusinessApplication.class);

    public static void main(String[] args) {
        //1.配置springApplication
        SpringApplication springApplication=new SpringApplication(BusinessApplication.class);
        //2.配置环境扫描
        Environment environment=springApplication.run(args).getEnvironment();
        LOG.info("业务核心模组BUSINESS启动成功");
        LOG.info("business地址：\thttp://127.0.0.1:{} ",environment.getProperty("server.port"));
        LOG.info("==>服务名称：{}",environment.getProperty("server.name"));
    }
}
